<template>
	<view style="background-color: #fff;height: 100vh;">
		<view class="">
			<view class="" style="background-color: #f8f8f8;height: 26rpx;"></view>
			<view class="" style="background-color: #fff;padding: 0 30rpx;">
				
				<view class="">
					<view class="" style="padding: 30rpx 0;border-bottom: 1rpx solid #efefef;display: flex;flex-direction: column;">
						<view class="" style="font-weight: bold;">
							{{msg.title}}
						</view>
						<view class="" style="display: flex;justify-content: space-between;padding: 30rpx 0;color: #adadad;">
							<view class="">
								{{msg.createtime}}
							</view>
							<view class="">
								阅读：{{msg.read_number}}
							</view>
						</view>
					</view>
					<view class="" style="padding: 30rpx 0;">
						{{msg.content}}
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				msg:{},
				msgList:[],
				
			}
		},
		// onShow() {
		// 	this.getMessageList()
		// },
		onLoad(option) {
			this.id = option.id
			console.log(this.id)
			this.getMessageDetail()
		},
		methods: {
			async getMessageDetail(){
				const res = await this.$api.MessageDetail({'id':this.id})
				console.log(res)
				if(res.code==1){
					this.msg = res.data
					// this.msgList = this.msg.data
				}else{
					this.$refs.uToast.show({
						title: res.msg,
						type: 'error'
					})
				}
			},
			toOrderDetail(item){
				console.log(item.id)
				uni.navigateTo({
					url:'/pages/notice/detail?id='+item.id
				})
			}
		}
	}
</script>

<style lang="scss">
	
</style>
